var _ = require('lodash');

var initialState = {
    news:{},
    commen:{}
}
function reducer(state=initialState,action){
    switch(action.type){
        case "GETNEWS":
            return Object.assign({},state,{news: action.data});
        case "GETCOMMEN":
            return Object.assign({},state,{commen: action.data});
        case "PUTCOMMEN":
            return Object.assign({},state,{commen: action.data});
        default:
            return state;
    }
}

export default reducer;